/*
 * @author java_deng
 * @date 2024/12/17 9:34
 * @description
 */
package org.kaka.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_book")
public class BookDto {
    @TableId(type = IdType.AUTO)
    private Long id;
    @NotNull(message = "书名不能为空")
    private String name;
    @NotNull(message = "简介不能为空")
    @TableField("`desc`")
    private String desc;
    @NotNull(message = "书籍分类不能为空")
    private Integer categoryId;
    private Long imageId;
    private Integer postNum;
    private Integer auditStatus;
    private Integer isDeleted;
    private Long userId;
    private String author;
}
